<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-jmeterNode-add">
			<div class="form-group">	
				<label class="col-sm-3 control-label">子节点名称：</label>
				<div class="col-sm-8">
					<input id="node_Name" name="node_Name" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">节点端口：</label>
				<div class="col-sm-8">
					<input id="nodePort" name="nodePort" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">ip地址：</label>
				<div class="col-sm-8">
					<input id="ip" name="ip" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">Jmeter链接端口号：</label>
				<div class="col-sm-8">
					<input id="jmeterPort" name="jmeterPort" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">节点机用户名：</label>
				<div class="col-sm-8">
					<input id="userName" name="userName" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">节点机密码：</label>
				<div class="col-sm-8">
					<input id="passwd" name="passwd" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">最大并发数 </label>
				<div class="col-sm-8">
					<input id="maxConcurrency" name="maxConcurrency" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">cpu </label>
				<div class="col-sm-8">
					<input id="cpu" name="cpu" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">内存 单位g </label>
				<div class="col-sm-8">
					<input id="memory" name="memory" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">磁盘 单位g -1表示未填写 ：</label>
				<div class="col-sm-8">
					<input id="disk" name="disk" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">io </label>
				<div class="col-sm-8">
					<input id="io" name="io" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">系统类型：</label>
				<div class="col-sm-8">
					<select id="os" name="os"  class="form-control" >
					<option value="windows" >windows</option>
					<option value="linux" >linux</option>
				</select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">子节点的Jmeter路径：</label>
				<div class="col-sm-8">
					<input id="homeDir" name="homeDir" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">状态  0：禁用   1：正常：</label>
				<div class="col-sm-8">
					<input id="status" name="status" class="form-control" type="text">
				</div>
			</div>
		</form>
	</div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "jmeter/jmeterNode"
		$("#form-jmeterNode-add").validate({
			rules:{
				homeDir:{
					required:true,
				},
			},

			messages: {
				homeDir:  "Jmeter目录不能为空"
			}
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
				var values = $("#frmblog").serializeArray();
				values.push({
					name: "nodeName",
					value: $("#node_Name").val().trim()
				});
				values = jQuery.param(values);

	            $.operate.save(prefix + "/add", values);
	        }
	    }
	</script>
</body>
</html>
